fix(pr-size): build check-pr-size with GOWORK=off for consumers with a root go.work#52
Conversation
…a root go.work
The reusable pr-size workflow checks out the check-pr-size tool into
_pr_size_tool/ under the consumer repo's checkout, then runs `go build`
there. When the consumer repo has a go.work at its checkout root (e.g.
Comfy-Org/cloud), Go discovers that workspace file, sees the tool module
is not one of its listed modules, and fails the build:
current directory is contained in a module that is not one of the
workspace modules listed in go.work
The tool module is dependency-free (no go.sum), so building it in
single-module mode is safe and correct. Set GOWORK=off on the build
step so the consumer's workspace never leaks into the tool build.
Reproduced locally: a nested module under a root go.work that lists
only other modules fails to `go build` and succeeds with GOWORK=off.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 24 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
Found 1 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
Panel: 8/8 reviewers contributed findings.
Unquoted `off` is resolved as YAML 1.1 boolean false by the GitHub Actions parser and exported as GOWORK=false. Go then treats it as a workspace-file path and aborts with "$GOWORK must be an absolute path", failing the build step unconditionally instead of disabling workspace mode. Quoting passes the literal string "off" through, which is what actually disables workspace mode. Raised by cursor-review adversarial panel (claude-opus-4-8-thinking-max). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ff-for-consumer-gowork # Conflicts: # .github/workflows/pr-size.yml
Problem
The reusable
pr-size.ymlchecks out thecheck-pr-sizetool into_pr_size_tool/under the consumer repo's checkout, then runsgo buildthere. When the consumer repo has ago.workat its checkout root (e.g. Comfy-Org/cloud),go builddiscovers that workspace file, sees the tool module isn't one of its listed modules, and fails:This is blocking Comfy-Org/cloud#5336 (the flip to this reusable caller, BE-3483) — the
pr-sizejob dies at the build step before it can even count the diff.Fix
Set
GOWORK: offon the Build check-pr-size step. The tool module is dependency-free (nogo.sum), so building it in single-module mode is safe and correct — it just stops the consumer's workspace from leaking into the tool build.Verification
Reproduced locally with a nested module under a root
go.workthat lists only other modules:Once merged, Comfy-Org/cloud#5336's caller will be re-pinned to the merged SHA.
🤖 Generated with Claude Code